package com.prothink.threadadmindemo.task;

import java.util.concurrent.*;

/**
 * @author mayanping
 * @title: MyThreadPool
 * @projectName ThreadAdminDemo
 * @description: TODO
 * @date 2024/9/1914:14
 */
public class MyThreadPool {
    //核心线程数为5的线程池
    public static ExecutorService THREAD_POOL = new ThreadPoolExecutor(
            5,
            10,
            5,
            TimeUnit.SECONDS,
            new LinkedBlockingDeque<>(),
            Executors.defaultThreadFactory(),
            new ThreadPoolExecutor.AbortPolicy()
    );
}
